﻿using System;
using FreeSql.DataAnnotations;

namespace Quartz.NET.Web.Models
{
    /// <summary>
    /// 任务信息
    /// </summary>
    public class TaskOptions : BaseModel
    {
        /// <summary>
        /// 任务名称
        /// </summary>
        [Column(DbType = "varchar(120)")]
        public string taskName { get; set; }
        /// <summary>
        /// 组名
        /// </summary>
        [Column(DbType = "varchar(60)")]
        public string groupName { get; set; }
        /// <summary>
        /// 间隔
        /// </summary>
        [Column(DbType = "varchar(36)")]
        public string interval { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public DateTime? startTime { get; set; }

        /// <summary>
        /// API地址
        /// </summary>
        [Column(DbType = "varchar(150)")]
        public string apiUrl { get; set; }
        /// <summary>
        /// 授权key
        /// </summary>
        [Column(DbType = "varchar(30)")]
        public string authKey { get; set; }
        /// <summary>
        /// 授权值
        /// </summary>
        [Column(DbType = "varchar(150)")]
        public string authValue { get; set; }

        /// <summary>
        /// Api参数
        /// </summary>
        [Column(DbType = "varchar(2048)")]
        public string apiParams { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [Column(DbType = "varchar(150)")]
        public string describe { get; set; }
        /// <summary>
        /// 请求类型
        /// </summary>
        [Column(DbType = "varchar(150)")]
        public string requestType { get; set; }
        /// <summary>
        /// 最后执行时间
        /// </summary>
        [Column(DbType = "varchar(150)")]
        public DateTime? lastRunTime { get; set; }
        /// <summary>
        /// 状态 0:正常 1:暂停 2:完成 3:异常 4:阻塞 5:停止 不存在
        /// </summary>
        public int status { get; set; }
    }
}
